Class PortImpl

All Implemented Interfaces:
IPCObject, Port, Process
Direct Known Subclasses:
CloudPotsPortImpl, CloudSerialPortImpl, ConsolePortImpl, HostPortImpl, IoEComponentImpl, SwitchPortImpl, UsbPortImpl

public class PortImpl extends ProcessImpl implements Port
Information provided by the PKI file:

    \class Port
    
    \brief Port holds and manipulates the ports on devices.
    
    \example network().getDevice("Router0").getPort("FastEthernet0/0")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Information provided by the PKI file:
      
          \brief Returns the name of the port.
          
          \return string, the name of the port.
          
              
      Specified by:
      getName in interface Port
      Returns:
      String Returns a String
    • getChannel

      public int getChannel()
      Information provided by the PKI file:
      
          \brief Returns the channel of the port.
          
          \return int, the channel of the port.
          
              
      Specified by:
      getChannel in interface Port
      Returns:
      int Returns a int
    • setChannel

      public void setChannel(int channel)
      Information provided by the PKI file:
      
          \brief Sets the channel of the port.
          
          \channel, the channel of the port.
          
              
      Specified by:
      setChannel in interface Port
      Parameters:
      channel - Takes in a parameter of channel
    • getTerminalTypeShortString

      public String getTerminalTypeShortString()
      Information provided by the PKI file:
      
          \brief Returns the name of the port shortened, without number.
          
          \return string, the name of the port.
          
              
      Specified by:
      getTerminalTypeShortString in interface Port
      Returns:
      String Returns a String
    • getPortNameNumber

      public String getPortNameNumber()
      Information provided by the PKI file:
      
          \brief Returns the port number.  Can have something like 0/0/0, etc.
          
          \return string, the name of the port.
          
              
      Specified by:
      getPortNameNumber in interface Port
      Returns:
      String Returns a String
    • getType

      public PortType getType()
      Information provided by the PKI file:
      
          \brief Returns the type of the port.
          
          \return PortType,   the type of the port.
          Port types: eConsole = 0,
          eAux = 1,
          eCopperEthernet = 2,
          eCopperFastEthernet = 3,
          eCopperGigabitEthernet = 4,
          eFiberFastEthernet = 5,
          eFiberGigabitEthernet = 6,
          eSerial = 7,
          eSmartSerial = 8,
          eAccessPointWirelessG = 9,
          eAccessPointWirelessN = 10,
          eAccessPointWirelessA = 11,
          eHostWirelessG = 12,
          eHostWirelessN = 13,
          eSubInterface = 14,
          eLoopback = 15,
          ePortChannel = 16,
          eVlan = 17,
          eModem = 18,
          eRs232 = 19,
          eFRSubInterface = 20,
          eCopperCoaxial = 21,
          eCoaxial7 = 22,
          eVirtualLink = 23,
          eHostWirelessA = 24,
          eTunnel = 25,
          eVirtualTemplate = 26,
          ePtCoAxialSplitterModule = 27,
          eVirtualAccess = 28,
          eTerminal = 29,
          eAsync = 30,
          eNull = 31,
          eWlanGigabitEthernet = 32,
          eWlanConsole = 33,
          eBVI = 34,
          eAccessPoint3G = 35,
          eHost3G = 36,
          eUsbPort = 37,
          eGenericIoE = 38,
          eCustomIO = 39,
          eVirtualPortGroup = 40,
          ePoE = 41,
          eTty = 42,
          eUsbConsole = 43
          
              
      Specified by:
      getType in interface Port
      Returns:
      PortType Returns a PortType
    • setDescription

      public void setDescription(String description)
      Information provided by the PKI file:
      
          \brief Sets the description for the port.
          
          \param description, the description for the port.
          
              
      Specified by:
      setDescription in interface Port
      Parameters:
      description - Takes in a parameter of description
    • getDescription

      public String getDescription()
      Information provided by the PKI file:
      
          \brief Returns the description of the port.
          
          \return string, the description of the port.
          
              
      Specified by:
      getDescription in interface Port
      Returns:
      String Returns a String
    • setPower

      public void setPower(boolean bOn)
      Information provided by the PKI file:
      
          \brief Sets the power state for the port.
          
          \param bOn, true to turn the port on, false to turn it off.
          
              
      Specified by:
      setPower in interface Port
      Parameters:
      bOn - Takes in a parameter of bOn
    • getPower

      public boolean getPower()
      Information provided by the PKI file:
      
          \brief Returns true if the port is on, false if the port is off.
          
          \return bool, true if the port is on, false if the port is off.
          
              
      Specified by:
      getPower in interface Port
      Returns:
      boolean Returns a boolean
    • isStraightPins

      public boolean isStraightPins()
      Information provided by the PKI file:
      
          \brief Returns true if the pins are straight, for ethernet
          
          \return bool, true if the pins are straight, otherwise false.
          
              
      Specified by:
      isStraightPins in interface Port
      Returns:
      boolean Returns a boolean
    • isAutoCross

      public boolean isAutoCross()
      Information provided by the PKI file:
      
          \brief Returns true if the port is configured for auto crossover, for ethernet
          
          \return bool, true if the port is configured for auto crossover, otherwise false.
          
              
      Specified by:
      isAutoCross in interface Port
      Returns:
      boolean Returns a boolean
    • setBandwidth

      public void setBandwidth(int bandwidth)
      Information provided by the PKI file:
      
          \brief Sets the bandwidth for the port.
          
          \param bandwidth, the bandwidth for the port.
          
              
      Specified by:
      setBandwidth in interface Port
      Parameters:
      bandwidth - Takes in a parameter of bandwidth
    • getBandwidth

      public int getBandwidth()
      Information provided by the PKI file:
      
          \brief Returns the bandwidth of the port.
          
          \return int, the bandwidth of the port.
          
              
      Specified by:
      getBandwidth in interface Port
      Returns:
      int Returns a int
    • setBandwidthAutoNegotiate

      public void setBandwidthAutoNegotiate(boolean autoNegotiate)
      Information provided by the PKI file:
      
          \brief Enables or disables bandwidth auto negotiation.
          
          \param autoNegotiate, true to enable bandwidth auto negotiation, false to disable it.
          
              
      Specified by:
      setBandwidthAutoNegotiate in interface Port
      Parameters:
      autoNegotiate - Takes in a parameter of autoNegotiate
    • isBandwidthAutoNegotiate

      public boolean isBandwidthAutoNegotiate()
      Information provided by the PKI file:
      
          \brief Returns true if bandwidth auto negotiation is enabled, otherwise false.
          
          \return bool, true if bandwidth auto negotiation is enabled, otherwise false.
          
              
      Specified by:
      isBandwidthAutoNegotiate in interface Port
      Returns:
      boolean Returns a boolean
    • setFullDuplex

      public void setFullDuplex(boolean fullDuplex)
      Information provided by the PKI file:
      
          \brief Enables or disables full duplex mode.
          
          \param fullDuplex, true to enable full duplex mode, false to disable it.
          
              
      Specified by:
      setFullDuplex in interface Port
      Parameters:
      fullDuplex - Takes in a parameter of fullDuplex
    • isFullDuplex

      public boolean isFullDuplex()
      Information provided by the PKI file:
      
          \brief Returns true if full duplex mode is enabled, otherwise false.
          
          \return bool, true if full duplex mode is enabled, otherwise false.
          
              
      Specified by:
      isFullDuplex in interface Port
      Returns:
      boolean Returns a boolean
    • setDuplexAutoNegotiate

      public void setDuplexAutoNegotiate(boolean autoNegotiate)
      Information provided by the PKI file:
      
          \brief Enables or disables duplex auto negotiation.
          
          \param autoNegotiate, true to enable duplex auto negotiation, false to disable it.
          
              
      Specified by:
      setDuplexAutoNegotiate in interface Port
      Parameters:
      autoNegotiate - Takes in a parameter of autoNegotiate
    • isDuplexAutoNegotiate

      public boolean isDuplexAutoNegotiate()
      Information provided by the PKI file:
      
          \brief Returns true if duplex auto negotiation is enabled, otherwise false.
          
          \return bool, true if duplex auto negotiation is enabled, otherwise false.
          
              
      Specified by:
      isDuplexAutoNegotiate in interface Port
      Returns:
      boolean Returns a boolean
    • setMacAddress

      public void setMacAddress(MACAddress macAddress)
      Information provided by the PKI file:
      
          \brief Sets the MAC address on the port.
          
          \param macAddress, the MAC address to set on the port.
          
              
      Specified by:
      setMacAddress in interface Port
      Parameters:
      macAddress - Takes in a parameter of macAddress
    • getMacAddress

      public MACAddress getMacAddress()
      Information provided by the PKI file:
      
          \brief Returns the MAC address set on the port.
          
          \return mac, the MAC address set on the port.
          
              
      Specified by:
      getMacAddress in interface Port
      Returns:
      MACAddress Returns a MACAddress
    • getBia

      public MACAddress getBia()
      Information provided by the PKI file:
      
          \brief Returns the burned-in address of the port.
          
          \return mac, the burned-in address of the port.
          
              
      Specified by:
      getBia in interface Port
      Returns:
      MACAddress Returns a MACAddress
    • setClockRate

      public void setClockRate(int clockrate)
      Information provided by the PKI file:
      
          \brief Sets the clock rate on the port.
          
          \param clockrate, the clock rate to set on the port.
          
              
      Specified by:
      setClockRate in interface Port
      Parameters:
      clockrate - Takes in a parameter of clockrate
    • getClockRate

      public int getClockRate()
      Information provided by the PKI file:
      
          \brief Returns the clock rate on the port.
          
          \return int, the clock rate on the port.
          
              
      Specified by:
      getClockRate in interface Port
      Returns:
      int Returns a int
    • getLink

      public Link getLink()
      Information provided by the PKI file:
      
          \brief Returns the link connected to the port.
          
          \return Link, the Link object connected to the port.
          
              
      Specified by:
      getLink in interface Port
      Returns:
      Link Returns a Link
    • isProtocolUp

      public boolean isProtocolUp()
      Information provided by the PKI file:
      
          \brief Returns true if the line protocol is up on the port, otherwise false.
          
          \return bool, true if the line protocol is up on the port, otherwise false.
          
              
      Specified by:
      isProtocolUp in interface Port
      Returns:
      boolean Returns a boolean
    • isPortUp

      public boolean isPortUp()
      Information provided by the PKI file:
      
          \brief Returns true if the status is up on the port, otherwise false.
          
          \return bool, true if the status is up on the port, otherwise false.
          
              
      Specified by:
      isPortUp in interface Port
      Returns:
      boolean Returns a boolean
    • getEncapProcess

      public Process getEncapProcess()
      Information provided by the PKI file:
      
          \brief Returns the encapsulation process.
          
          \return Process, the Process object.
          
              
      Specified by:
      getEncapProcess in interface Port
      Returns:
      Process Returns a Process
    • getKeepAliveProcess

      public Process getKeepAliveProcess()
      Information provided by the PKI file:
      
          \brief Returns the keepalive process.
          
          \return Process, the Process object.
          
              
      Specified by:
      getKeepAliveProcess in interface Port
      Returns:
      Process Returns a Process
    • getLightStatus

      public LightStatus getLightStatus()
      Information provided by the PKI file:
      
          \brief Returns the link light status.
          
          \return LightStatus, the link light status.
          Link light statuses:        eOffLight = 0,
          eAmberLight = 1,
          eGreenLight = 2,
          eBlink = 3
          
              
      Specified by:
      getLightStatus in interface Port
      Returns:
      LightStatus Returns a LightStatus
    • getHigherProcessCount

      public int getHigherProcessCount()
      Information provided by the PKI file:
      
          \brief Returns the higher process count.
          
          \return int, the higher process count.
          
              
      Specified by:
      getHigherProcessCount in interface Port
      Returns:
      int Returns a int
    • getHardwareQueue

      public HardwareQueue getHardwareQueue()
      Information provided by the PKI file:
      
          \brief Returns the hardware queue.
          
          \return HardwareQueue, the hardware queue.
          
              
      Specified by:
      getHardwareQueue in interface Port
      Returns:
      HardwareQueue Returns a HardwareQueue
    • getQosQueue

      public QueueProcess getQosQueue()
      Information provided by the PKI file:
      
          \brief Returns the qos queue.
          
          \return QueueProcess, the qos queue.
          
              
      Specified by:
      getQosQueue in interface Port
      Returns:
      QueueProcess Returns a QueueProcess
    • isEthernetPort

      public boolean isEthernetPort()
      Information provided by the PKI file:
      
          \brief Returns true if it is a ethernet port, false if not.
          
          \return bool, true if it is a ethernet port, false if not.
          
              
      Specified by:
      isEthernetPort in interface Port
      Returns:
      boolean Returns a boolean
    • isWirelessPort

      public boolean isWirelessPort()
      Information provided by the PKI file:
      
          \brief Returns true if it is a wireless port, false if not.
          
          \return bool, true if it is a wireless port, false if not.
          
              
      Specified by:
      isWirelessPort in interface Port
      Returns:
      boolean Returns a boolean
    • isPowerOn

      public boolean isPowerOn()
      Information provided by the PKI file:
      
          \brief Returns true if the power is on, false if not.
          
          \return bool, true if the power is on, false if not.
          
              
      Specified by:
      isPowerOn in interface Port
      Returns:
      boolean Returns a boolean
    • deleteLink

      public void deleteLink()
      Specified by:
      deleteLink in interface Port